package com.epin.base.plugins;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;


public abstract class DmsModel<T extends DmsModel<?>> extends Model<T> {
	/**
	 * id 约定为自增
	 */
	private Integer id;
	/**
	 * 创建者id
	 */
	@TableField("creator_id")
	private Integer creatorId;
	/**
	 * 创建时间
	 */
	@TableField("create_time")
	private Date createTime;
	/**
	 * 修改者id
	 */
	@TableField("updator_id")
	private Integer updatorId;
	/**
	 * 修改时间
	 */
	@TableField("update_time")
	private Date updateTime;
	//
	//
	/**
	 * creator's Universally Unique Identifier 不同系统中 创建者的唯一识别码
	 */
	@TableField("creator_uuid")
	private String creatorUUID;
	/**
	 * updator's Universally Unique Identifier 不同系统中 修改者的唯一识别码
	 */
	@TableField("updator_uuid")
	private String updatorUUID;

	
	public Integer getId() {
		return id;
	}


	public void setId(Integer id) {
		this.id = id;
	}


	public Integer getCreatorId() {
		return creatorId;
	}


	public void setCreatorId(Integer creatorId) {
		this.creatorId = creatorId;
	}


	public Date getCreateTime() {
		return createTime;
	}


	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}


	public Integer getUpdatorId() {
		return updatorId;
	}


	public void setUpdatorId(Integer updatorId) {
		this.updatorId = updatorId;
	}


	public Date getUpdateTime() {
		return updateTime;
	}


	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}


	public String getCreatorUUID() {
		return creatorUUID;
	}


	public void setCreatorUUID(String creatorUUID) {
		this.creatorUUID = creatorUUID;
	}


	public String getUpdatorUUID() {
		return updatorUUID;
	}


	public void setUpdatorUUID(String updatorUUID) {
		this.updatorUUID = updatorUUID;
	}


	@Override
	protected Serializable pkVal() {
		return this.id;
	}
	
	
	/**
	 * 执行该方法时，通过判断该子类实体 是否已存有Id来进行init相关属性
	 * @param sysUser
	 */
//	public void initProp(SysUser sysUser)
//	{
//		int sysUserId=sysUser.getId();
//		//如果为空，则意味着是增加
//		if(this.getId()==null){
//			this.setCreatorId(sysUserId);
//			this.setCreateTime(new Date(System.currentTimeMillis()));
//		}
//		this.setUpdatorId(sysUserId);
//		this.setUpdateTime(new Date(System.currentTimeMillis()));
//	}
	
	
	
	
	

}
